package test.test1202;

public class test11 {
    public static void main(String[] args) {
        int[] arr=new int[]{5,2,7,4,5,6};
        int min=min(arr);
        System.out.println(min);
    }
    public static int min(int[] arr){
        int min=arr[0];
        for (int i = 1; i < arr.length; i++) {
            min=min<arr[i]?min:arr[i];
        }
        return min;
    }
}
